
CREATE SEQUENCE IF NOT EXISTS public."OTRoomSurgeryMap_OTRoomSurgeryMapId_seq"
    INCREMENT 1
    START 1
    MINVALUE 1
    MAXVALUE 9223372036854775807
    CACHE 1;


CREATE TABLE IF NOT EXISTS public."OTRoomSurgeryMap"
(
    "OTRoomSurgeryMapId" bigint NOT NULL DEFAULT nextval('"OTRoomSurgeryMap_OTRoomSurgeryMapId_seq"'::regclass),
    "OTRoomId" integer NOT NULL,
    "SurgeryId" integer NOT NULL,
    "LocationId" integer NOT NULL,
    CONSTRAINT "OTRoomSurgeryMap_pkey" PRIMARY KEY ("OTRoomSurgeryMapId"),
    CONSTRAINT "OTRoomSurgeryMap_LocationId_fkey" FOREIGN KEY ("LocationId")
        REFERENCES public."Location" ("LocationId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "OTRoomSurgeryMap_OTRoomId_fkey" FOREIGN KEY ("OTRoomId")
        REFERENCES public."OTRoom" ("OTRoomId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "OTRoomSurgeryMapp_SurgeryId_fkey" FOREIGN KEY ("SurgeryId")
        REFERENCES public."Surgery" ("SurgeryId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)